home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d4
/
bronto.arc
/
BRONTO.BAS
next >
Wrap
BASIC Source File
|
1988-08-17
|
3KB
|
99 lines
' BRONTO is an EGA graphics program written for my 2 year old son James Nelson
' Start and Stop the brontosaurus with any key press.
' EGA board with 256K is required
' Program was written in Quickbasic; Works only in 2.01 or higher
' Bronto.exe works without Quickbasic; Uses both screen pages with And/Or
' animation. Send comments (no cash) to:
'
' Gordon Arbuthnot
' 8204 Bittern Lane
' Indianapolis, IN 46256
' Compuserve [73125,1117]
' GEnie G.Arbuthnot
' put the title image in page 1; free up the data space used by the array
' $DYNAMIC
dim title%(23142)
bload "title.bin",varptr(title%(0))
screen 9,,1,0
put (80,90),title%,pset
screen ,,0,1 ' show the title in page 1; work in page 0
erase title% ' free up title array
'get the images from disk and load into the arrays
dim image0%(1830)
dim image0mask%(1830)
dim image1%(1830)
dim image1mask%(1830)
dim background0%(1830)
dim background1%(1830)
dim rock%(181)
dim rockmask%(181)
dim dscene%(15000)
bload "d11.bin",varptr(image0%(0))
bload "d11m.bin",varptr(image0mask%(0))
bload "d21.bin",varptr(image1%(0))
bload "d21m.bin",varptr(image1mask%(0))
bload "rock.bin",varptr(rock%(0))
bload "rockm.bin",varptr(rockmask%(0))
'set critical movement parameters
shift%=5
xw%=134:yw%=49
'put background into page 0
bload "dscene1.bin",varptr(dscene%(0))
put (0,0),dscene%,pset
bload "dscene2.bin",varptr(dscene%(0))
put (0,91),dscene%,pset
bload "dscene3.bin",varptr(dscene%(0))
put (0,181),dscene%,pset
bload "dscene4.bin",varptr(dscene%(0))
put (0,271),dscene%,pset
get (500,130)-(500+xw%,130+yw%),background0%
get (500-shift%,130)-(500-shift%+xw%,130+yw%),background1%
put (500,130),image0mask%,and
put (500,130),image0%,or
put (275,172),rockmask%,and
put (275,172),rock%,or
screen ,,1,0 ' show loaded scene; work in page 1
pcopy 0,1 ' move the background into page 1
put (0,271),dscene%,pset
put (500,130),background0%,pset
put (500-shift%,130),image1mask%,and
put (500-shift%,130),image1%,or
' Move the dinosaur across the screen
for x%=500-2*shift% to 20 step -2*shift%
screen ,,0,1
put (x%+2*shift%,130),background0%,pset
get (x%,130)-(x%+xw%,130+yw%),background0%
put (x%,130),image0mask%,and
put (x%,130),image0%,or
put (275,172),rockmask%,and
put (275,172),rock%,or
screen ,,1,0
put (x%+shift%,130),background1%,pset
get (x%-shift%,130)-(x%-shift%+xw%,130+yw%),background1%
put (x%-shift%,130),image1mask%,and
put (x%-shift%,130),image1%,or
put (275,172),rockmask%,and
put (275,172),rock%,or
' a keystroke will toggle the dinosaur movement
if inkey$="" goto continue
holdit: if inkey$="" goto holdit
continue:
next x%
pause: if inkey$="" goto pause